<template>
  <div class="faceshare" @click="$router.push(`/sharedetail/${item.id}`)">
    <div class="title"><span v-html="item.title"></span></div>
    <div class="introduce">
      {{ item.content }}
    </div>
    <div class="other">
      <div class="user">
        <img
          class="iconImg"
          :src="'http://47.106.228.28:1337' + item.cover"
          alt=""
        />
        <span class="name">{{ item.author.nickname }}</span>
      </div>
      <div class="date">{{ item.created_at | dateformat }}</div>
      <div class="view">
        <van-icon name="chat-o" style="margin-right:10px" /><span>{{
          item.article_comments
        }}</span>
      </div>
      <div class="star">
        <van-icon name="good-job-o" style="margin-right:10px" /><span>{{
          item.star
        }}</span>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  props: ['item']
}
</script>
<style lang="less" scoped>
.faceshare {
  padding: 15px;
  margin: 10px 0;
  .title {
    font-size: 16px;
  }
  .introduce {
    font-size: 14px;
    text-overflow: -o-ellipsis-lastline;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin: 10px 0 20px 0;
    color: #666;
    line-height: 20px;
  }
  .other {
    display: flex;
    line-height: 27px;
    color: #666;
    .user {
      display: flex;
      flex: 1;
      align-content: center;
      .name {
        margin-left: 10px;
      }
    }
    .iconImg {
      width: 30px;
      height: 30px;
      border-radius: 50%;
    }
    .view {
      margin: 0 10px 0 15px;
    }
    .star {
      margin: 0 10px 0 20px;
    }
  }
}
</style>
